General bugfixing prior to 1.0