Error corrections and improvements