MAJOR bug fixes