corrected a major bug