bug fix id'd by @antimon51 for #181