fixed edge cases to use sse