fixing device orientation issue