-o glance: Multiple fixes.

Now tested and working on a glance server.

This fixes commit f01f641fbb1a29b5727c0443f3700b1c871ccfc9.