fixes js syntax problems and migration dependency