The error message is because you can't remove an entity directly in an event, you must add a wait() before for finishing the event. This is also in the manual when you look for the number of that error message.