updated to handle scaling canvas to original before scaling up on resize