Fix misleading error message when using optional or repeatedly parser

#34