fixing bug for LTR/RTL check