Fixes for the tickets 19455 and 19488

Fixes for the tickets 19455 and 19488