Fixes index creation when having a schema