Fix for ticket 387