fix $ undefined error.