various bug fixes. resource system is broken for MI classes :(. references #29