Removed return value bugs from CD bindings

This may cause to be a problem in the future