fix card possition calculation bug