change_threshold() bugfix