moved logic to adjust for data tables spacebar issue