Small fix, checking for wrong ref