Crash bug fix