fixed comment creation javascript