Fix incorrect variable name, and initialise $LastPrice variable name
Ensure variable is initialised