Fixed ClassCastException by me derping last night via copypasta