Not sure why final condition is not passing