PR: 5705 Submitted by: <paulo@samurai.dee.uc.pt>
PR: 3867 Submitted by: Paulo Menezes <paulo@isr.uc.pt>