fixed wrong deletion order of messages
fixed wrong deletion order of messages

and gave the variable 'tmp' a better name

thomasf/dunst,travisred/dunst,LukeShu/dunst,LukeShu/dunst,travisred/dunst,LukeShu/dunst,thomasf/dunst