This patch from Magnus Damm fixed a long standing problem