Removed warnings about converting from unsigned long to long.