fixed logic problem on 404