Bug Fix for validate method.

validate method had a minor bug ... so here is the fix.