There are seven cases for solving the last two centers. In the pictures below the Top face should be Blue and the front face Red.
If your centers are not in the correct position then you can use the following algorithms to correct the centers.