src: bugfixes