more fixes :D

major fixes to delete and flag as well as message system