fixed global problem to speed up framerate