Fixes up

Small nasty stuff, wrong variables fixes