fix bug that would lead to json parsing error while removing type of resource