fixed false order of declare and let statements