added extra checking for pjax requests