Minor if statement fix