allow proc to be called before redirecting fixes #56