Fixing some lines of code