Add support for negative refs