Jquery datatable not saving state first time round

Jquery datatable not saving state first time round

Hi there,
 
Has anybody experienced an issue with Jquery datatables whereby the state of the table is only saved on the second attempt. For example, I press a button on the page which takes me to another page. When I go back to the page with the table, the state of the table should be the same as when I left it. The problem is, it only saves the state on navigating away from the page for a second time.
 
Here is the code for my table:
 
$(document).ready(function() {
                $('#data').dataTable({
                    "sPaginationType": "full_numbers",
                    "bStateSave": true,
                    "aaSorting": [
                        [ 3, "asc" ]
                    ],





                });
            });
 
Thanks.