rehearsal#1 Fixing bug on margin precision