Improve password query.