Added scene parameter to the callback function