Fix class convertion