fixed error in multisurface function