fixing bug with click direction