Fixing some pathological cases