Solved problem with diagnostic function.

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