fixed wrong attribute in js