fix #587