fixing issues raised in http://dev.gbif.org/code/cru/CR-POR-173