Fixed a major bug