fixed editing and deleing events