Fixed crash with invalid On lines.