Fixed the control flow of eastOf and westOf