Changed initialization method for on property