Had to change a bunch of stuff, hopefully it works