Bug fix: set key in operation