fixed issues with collapse/expand