app/deploy: fixed bug in deploy detail.
app/deploy: improving deploys query.