not removing last char off of secret

That makes it into an incorrect value and thus unusable.