add a lot of fixes