fix #273, fix bug