Fixes inappropriate size of metadata value

Fixes bug 1258079

Change-Id: If1ab03eafbb2c6fb5be77a83781dce533f253175