Fix card position calculation