fix flipper detection. fix viewport scaling.