Fixed some bugs and introduced new, more severe bugs