Fixed issue where -1 size_t was returned