fix #130: check the lenght of the provided caption
fix typo in #130