Making usemingPrepare work