fix direction property bug