Fixed regression from latest pull request