fixed $set issue