Fix more and more bugs