Fixed a crash caused by a change to initialization order