Various screen tearing fixes