Fix check for err ref