fixing bugs
close #114