fixing errors