Fix immediate mode