Fix some (messy) references in js control