Fix restriction check