Fixed platfrom stuff to work with viewports