Fixed a drawing issue in scriptmanager