js doc + fixed bug