Fixed error that shows up when clicking on a script object