fix a bug about direction