Fixes viewport bug