fixing the errors