Working on fixing the crash bug