Bug fix in resource.jl