Some updates. Bug fixes