Changed wrapper function to rebind 'this' to 'self'