revert to dd1922c6702b5871889539e90c615129addb9562
Applied changes from Jos