Fixed a couple of bugs in the recent overdraw pull request