Fix ClassCastException.

Signed-off-by: Mike Howe <dockter@almuramc.com>