Fix for the ticket 1504
Fix 1504