fix incorrect javascript variable