Fixed issue when no size specified by layout-function