more bugfixes (should build correctly now)