Changed unsigned long to unsigned int because it was causing problems for certain addresses.