Fix to credential validation