Removed alerts and fixed bug