fixed check in and check out bug