fixed #961, added test
Merge branch 'master' of github.com:mbeddr/mbeddr.core