Corrected more bugs