attempt at fixing errors