Fix bug in FIX40. Add test cases.