alert shown and bugs fixed