fixup resins code a bit