Quarry stuff

Fixes for two issues