maybe move this to the else block below, seems more logical.