fixes for double error callback