fix handling of errors from param callbacks

fixes #2149