fix #280 and fix #273