Fix wrong if statement to disable database validation