Corrected var name and added some aux logging