SmartDashboard Command Bugging Out

Hi everyone,
I recently wrote a PID turn command that takes PID values from preferences on a Java SmartDashboard. I put this command to the SmartDashboard in teleopinit. However sometimes when i run the command through the smart dashboard, the button bugs out. The button seems to be quickly alternating between “Start”(green) and “Cancel”(Red). Even when I disable the robot, the button is still bugging out. However, when I try to reload the robot code, the command seems to be working again. Has anyone else experienced this problem?