Fixed registration of functions inside an array of handlers.