removed signed/unsigned comparison warning
fixed incompatability with beckhoffd