fix bug in class attributes in GameCanvas