fix: bug with prepare method