Fixes direction bug