Small bugfixes, working source.