fixed a function in web