Fixed some issues in RTL mode