added registry block
added registry, bugfixing