fixed bug in alert condition, still not sure why warning won't popup