Fix js problems after merging