Fix bug: use intended variable