Correct lot of bugs