Fix for crash on empty strings