Added conditional however there is still an issue