Fixed an issue with wrong variable used!