final changes to stop errors