Minor fixes and checks