Fixed 'and' rather than && in if statement