Fix code review comments raised in https://reviews.facebook.net/D22779