fix bug in the previous version