Fixed autocomplete reset on hide

Fixes #5