Main fixes