bug fixes in server and index