fixed errors when receiving empty strings