Fixed referenceUI again

Please pull this before committing again.