It sounds like your seam allowance is not being consistent to the corner where you stop. I found that when the corners were not mitering well, I ripped out the corner section to see what was wrong. Usually it was the seam allowance the last inch before the corner. Another point was made above about making sure your folds were aligned correctly.