fixed a bug in wet.cpp