A few fixes and further improvements