Fix isPaddingMiddle, issue #15