fixed setKey error in browser; added getRandom to browser