fixes #5518 blank spaces must not affect unique fields