fix key counter in usage function