Fixed check-in function