fix #522