- Added unsigned long typecast to get rid of warnings