prevent exception if user presses delete key when no more messages to delete