fix a bug that neonbunny pointed out in commit cdab0ef45e1513c4b2c0382d7da3fb48ffc39754