finish fix of #740