Improved handling the UI offset on the right.