Fixed tests for some edge cases