fix javascript bugs and remove gon