fixed undefined values