Added checks for connections directions