Card positioning

Bug fixing, more robust card snapping.