fixes and modifications