not sure whether you use java api or some other implementation, but in java api the code contained some issues caused by profiles removal. the i provided was merged recently. i kept the original methods but it's better to use the new ones that i introduced (like? which use enums as the parameters instead of the hardcoded numbers and prevents unintentional providing of incorrect parameters.