fix various bugs with idea submission and javascript