fixing delete option for messages