Bug fix on restriction