Fix a nasty cast issue that my compiler was choking on.