fixing js disaster