Fixed ClassCastException issue. May be related to a proxy issue.