Fix support for the new shapes API