[untested] Improve previous fix and remove apparently non-working code.