Made runtime error system cuda compatible