re-init and close attribute-handler
New testcases added.