fixed empty string bug

Fixed by Alex