changes to make distribution not crash