Fixing collapse animation glitch.