Introduced some minor bugs