fixed bug in javascript namespace error