fix $(document).ready problem