FIX: Boost 1.57 compilation
FIX: Bounds check as suggested by David Binderman