fix sw render bug