fix bug of incorrectly use of "w$" and "w0"