Code cleanup for previous fix: b8169510d4