fix #262, check issues #260, #261