removed illegal assignments in resources
removed illegal assignments in repositories and nullchecks in delete methods