Added some edge cases.