fixed an initialization bug.
Solved #39.
merged the confilcts