Fixed a crash in Release build