diff --git a/aws-cognito.html b/aws-cognito.html
index b07036a..2ffc640 100644
--- a/aws-cognito.html
+++ b/aws-cognito.html
@@ -425,8 +425,9 @@
* @param {Boolean} expired Whether or not the credentials are expired.
*/
_computeSession: function(user, expired) {
- if (!this.session && !this.session.isValid() && !expired &&
- user && user.username) {
+ if (!(this.session && this.session.isValid()) &&
+ user && user.username &&
+ !expired) {
this._getSession(user)
.then((session) => this._setSession(session))
.catch((error) => {
diff --git a/bower.json b/bower.json
index 735593d..f8a4b76 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "polymeraws",
- "version": "3.0.13",
+ "version": "3.0.14",
"authors": [
"Joachim den Hertog",
"Benny Powers ",