Maybe it didnt work because I had formattedmessage and formattedmsg variables...