The previous patch has a bug. This patch replaces it.