Added code to handle rejecting clients