fixes and bugs