fixing js syntax some more