Fix exception during reload of modified script