Fixed javadoc and error statements