Fix several drawing issues on Mavericks