Fix for weird undefined values