[Minor] Fixes on top of #1679

Minor fixes on top of #1679.
bad code is bad code :-)