Fix a bug in directionChanged

Should compare direction with 'right' and 'left' ?