Fixed the deadlock and return value in checkpass