Attempt at fixing errors