Added small additon to cred check function