Fixed issue with flickering collapse