some fixes related to resource manipulations