Fixed MAJOR bug