it seems, the issue is solved, and like a good engineer, i changed so many things at once that i cant tell you what fixed the problem, but i guess it was inverting the signal from my Normally closed PNP proximity switch.
Thank you phil for your support and the tips u gave me