add the index & fix the server error