Added if statement

It doesn't really do anything at the moment.