fixing problem when mapping a list of primitive to a list of complex objects