direction wasn't getting set to -1