Restores barrier functions

@mathscientific