Fixed bug causing a null error in datatables