Fixed bug on sending message to active tab