Bug fix on schema deletion