Then it's not the ent_remove function causing the error but something bevor.