fixed error on calling resource