Minor patch to detecting directions