Fix more bad code