Fixing a bug in messages on api when message is hidden.