Bug fix when result is nil.