Fix for error case, remove callback style