Fix left and right ui elements problem