bugfix; error misreporting