changed variables which caused bugs.