bug: fix a crash