expects integer, fixes canvas size bug #6

thanks to http://stackoverflow.com/a/16502793/592125