Replaced deprecated call to live() with on()