restore accidentally deleted error method and fix name clash