fixed issues #118, #119