make internal format registration a bit more robust. possible public API in future.