Fixed a missing reference exception.