Miss one case in previous commit and one more optimization