Fixed updateStateByKey to work with primitive types.