backport regression fix from 2014.7

cherry-pick of 004f940

fixes I regression I introduced in e75f474