fixed thread bug and javadocd