fixed scope bug with getters and setters