fix for perspective switching