Fixed wrong variable usage