Added extra check for complete script in controller.execute()