Fix many errors