Fix for undefined values