BUGFIX: works for empty string

Signed-off-by: DeK