Update return value of avg for no connection

Now returns zero if there is no connection yet