Fix resource scope