better handle bad input in separate_first_last