Fixed bug with button collapse