Fix error when getting None resource