fixed note memory full bug, and returning to search page after clearing history from detail page