trying to fix the crash