Fix some variable type missmatches