I think a check like this should also be added at the top. E.g. we don't want to set left to 0 if we are fed the string "Hello".