test for constraints and fixes