Fixed direction detection (was bug with distinguishing +x and -x directi...

How about this one? It fixes https://github.com/t00thpick1/Residence/issues/2/