Fixed bug in remove_empty_values() method

Change-Id: Id6d402c76bd6d9647c23a7e3ce9d32fc6ded4614