Getting rid of warning
Change casting from Double to Long and vice-versa

How I was doing it was dumb. This way, it will behave as it
normally would, but try to cast where it makes sense.