Fix res reference