Added offset exists check to offsetGet