Fixed refresh posts after going back from search (also applies after going
back from profiles). Also fixed bugs with the .on() method.