fix snake movement direction checking. fixes #2