Fix the filtering of messages. Map is wierd

I don't know why I thought that other way would work.