Finally fixed the guard after like 6 hours. Thanks Adam.