Fixed empty metadata bug