Formattedmessage var wasnt in correct scope