Fixed bug with sorting table

Shifted call to datatables into $timeout call inside controller