Fixed resource reference bug