Small fixes

I fixed issues #51, #71, #72, #76, #77.