fix compile errors in trimmap.