fixed a bug when a non required field is not provided