fix receiving multiple messages, only import what is needed