added missing code and fixed javadoc

* missing code of commit 3c331852a8703e91673b5565d421044e4ada12c9