fix condition for empty field + test