Is there a reason why you check for this twice?