Fix error to allow second if statement to execute.