correct calibration of device orientation (fixes #5)