fix variable name bugs