fix #262, check issue #260, #261