fixed canvas dimensions bug