try to fix convert nil to hash