re-applying changes from commit d060b95d3b which were overwritten