There seem to be some leftover whenever I remove a link using extendscript that cause problems after.
I have posted this issue on stackoverflow so it would be easier if you can just read it over there.
Someone on Stack Overflow as found the solution and here it is.
Hey, Its none other than,
the great Genius. [Jongware].
Ya, I found him..