fixing other error in js