glue: fix for error handling in before/after