fix nil on resource base