BUg fix! Crashes on nvidia cards.