I tried it on a different computer and it worked. So I guess there is a problem with the arduino software on my computer.