Fixed some bugs that prevented wyvern from working well