fixed undefined value in hash