Fixed movePanel to refer to panel correctly