[bugfix] Variables weren't picked up with correct indicies, issue with counting empty hash