Fixed data type in resource add function