Fixed Bug 1952. The return type of the method has been changed from
const size_t & to size_t to avoid compiler warning.