fixed bad patch 119, added triggers for and added index