Fixed bugs in terraria plugin and module system.