Fix metavalue errors by adding better resetting