fixed compilation for empty and whitespace only strings