Ballymena United manager Jim Ervin says his side knew they were likely to hit a difficult period in their season after a purple patch which saw them sit top of the table.