fix autocomplete and validation