Little correction on diagnostic functions.

Signed-off-by: Luis Lau <luis.laum@gmail.com>