Fix bug
Add following function