Fix issue and add a new function.