Add cancel function to initializer