fixed #797
fixed a bug.
fixed build