Added unsigned long typecast to get rid of warnings

I don't like to see warnings in my projects, so I fixed these two lines that were giving warnings in a project I was helping with.