some error handling for pesky whitespaces