Bug fix for reset code.