Fix Cast error reported by MelonKing