fix panEnabled method