preferred-width and preferred-height memoizing is not working