add if to check width exists
Merge pull request #72 from praekelt/feature/issue-60-out-of-range

add if to check width exists