fix for converting to ruby hash