added direction check and fixed issue where arrows were drawn twice