fix overlay max size calculation

We only need to subtract the margin once in sizeTarget because the top and left already includes one side of the margin. Fixes #21.