small fix for return value of random sensor