fixed broken conditional