fixed infinite loop - alerts user