bug fixes and more scenarios