controller: lib: bugfixes
Merge pull request #8 from andrew-elder/master

controller: lib: bugfixes