fixed bug in create, delete