Bugfix: use string.find() instead of string.index() to avoid ValueError