Bug fix
new function