This patch to apr is useful