Solution for an issue I had today, more on the code