Fix minor problem where exception is thrown on draw