Fix some queries.
Update deploy script.