fixed some errors after cruft removal