minor fixes for frame switching