added canvas scaling