Fixing improper logic and inject() calls