Corrected major bug