Added a somewhat redundant cast so IntelliJ would stop crying.