fixed register bug.
Merge pull request #23 from tholzschuh/master

fixed register bug.