lol 

reversed the order in which it checked the messages for delete and flag