Ruby2.1.0 compatibility fix