Fix display of messages in chatbox due to wrong function call