Fixed Class Cast Exception