Fix messy code problem.