Add fix from RB3.5.5 #340.
Clean up.