patches: add clean up static registration