tweak to the logic which reads a little nicer

Hi asha23
Made a small adjustment, but I didn't actually test it out. I am sure it will work though.

:)