Rewrote the capes code and now it works perfectly fine.