Fixed code following review comments
Fixed code following review comments


Former-commit-id: b7a33291a3104b0ae66fa69202f691416d7a4d3c
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine