Fix for undefined $credentials variable.