Fixed getDirection and getPath

"brake" in getDirection and "or" in getPath