Clean up errors and only catch ValueErrors