Small fixes and a test