Changed size_t to unsigned long