remove undefined vars