Changed entity deletion
Fixed create bug