Fixing PL-Grid prepare_resource