Bug fix on schema