fix some bugs and auto-add partition modules when on loop device