Fixing isOk method problem