Fix bug in search method map access