fixed javadoc and multithreading bug