Other compiler fixes and added a chain call test