Fix #427, fix #428, close #429