Bug fix and updates