Fixed the crash