gregors cahnges to make keystone more robust
Resolved the merge conflict.