Like I said. the two monitors work just fine when I plug in my HDMI cable after the system is booted. Only when the cable is connected during boot both screens get messed up.
Also I tried other cables, but I still have the same problem. When I used my GTX 770 with the same cables, everything worked just fine. But now with the HD4000 it doesn't work.