Fixing some issues in collapse