migrate and fix warnings