Fixed bugs of previous commit