Fixes a part of Ticket1208 Found-by: John Villamil and Piotr Bandurski Signed-off-by: Michael Niedermayer <michaelni@gmx.at>