bugfixes, style changes