Removed the error function which shouldn't be needed