major bug repair..