Fixed ClassCastExceptions related to the new delegate adapter classes (#33)