fixed bug with messagemanager