Fixed error when trying to remove a message when no message is selected.