BUG: Fix crash when removing last trajectory (signals were not disconnected when last item was deleted)