Typo bugfix in $substr() implementation.