After looking at looking at your code and a ton of tinkering around I finally got it working. Thanks @samme