Throwing exception when trying to get real size and size not set