fixed a shitload of errors