Fixed bug in autocomplete feature and implemented test mode for this feature