Had to fix some code