Fixed matrix getHeight/Width. Calculated good dimensions for canvas size