Corrected small bugs after merge