fixed MAJOR bug