Fix a bug in directionChanged

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