JS dom fix