A few fixes after code review