Fix the remaining code