fix bug returning default value for zero length elements