Correct some bugs and adapt some parameters