fixed bug where I forgot to add an if structure.