Added a few assertion and possible fixes for potentially bad GVT
Fixed merge conflict