Removes more warnings related to unsigned long casting #69

Fixes #69, based on #76