fix the problems introduced by commit 62cfe2a76efde90d94d19e02b920140ca36a576e