this fixes restriction handling