fixed some things for distribution