bug fixes and more showdown code