fixed bugs of document ready