fixed autocomplete
tidy up more