Fixes for v7 compatibility