Discovered a native way of sending paste so removed this custom functionality altogether.