Noticed a bug in resource editing, added tests surrounding this, fixed bug