and remove unwanted debugging statements (cherry picked from commit 60b26ad8b262752e7d491b3fe21b398c0928bfaf)