Fixed a few bugs.
Also fixed buggy search function in webserve.