Minor bug fix in Panel