Fix missing boundary check on script parser