Consistency bugs fixes