BUG Fix session_write_close being called when module is disabled.