this seems to fix the crash