Fixed bugs #25 #27 #28 see milestone v1.3.0