Changed .live to .on for 2 events