Fixed a typecasting mistake

Fun fact: I don’t really know Java. All my experience is in C languages
and I’m making it up as I go along.