fixing bug with showing panels