fixed Behavior.cs exception

fixed type comparison