Cannot use Submit button even when correct condition logic was used