Fix for accidental revert b3fb456

Tests pass in py26 py27 py33 py34
Offline tests - 125
Online tests - 136