Fixed bug in query_functions where password setting was ignored