register_pe and register_fn working