Fix problem with GPU mode