1.3 branch. Fixed bugs