Fixed potentially problematic shader loading code.