collateral improvements
fixed collateral detection function
fixed more issues with collateral