fixing bug 1275
Merge pull request #530 from einhverfr/1.3

fixing bug 1275
Merge pull request #97 from ledgersmb/1.3

sync over 1.3 branch