Fixed some bugs in Shannon