Fixed bug with restrictions criteria