Fixed bug in parameter remove_empty.
Merge branch 'rmempty' into develop