fixed a bit of code