controller: lib: bugfixes

Please pull some bugfixes.