Fixed an issue on UB conditions