Bug fixes #2