Form conditions not functioning properly