Catches some edge cases.