Potentially fixed a large range of bugs and console warning spam