I pretty much just fixed the function that sets the screen dimensions.