fix bug on emptying all the field