Fixes class mismatch error.