Fix errors and other stuff