fix #407 partial