fix a small crash bug