fixing major bug