fix minor crash bug