Fixed var name bugs