Fix casting problem
Fix handling of exceptions so daemon can continue running
Fix wrong construction of Redis key names