Fixed bugs >.<

fixed the embarassing bugs