fixing handle pin change state condtion in behavior class