fixes, closes #3 - RequestListener uses kernel.terminate event instead of register_shutdown_function