Fixing restricted data handling logic