First, you should do a partial water change. This will remove much of the medication and help reduce the stress on your fish. Then, you need to remove any activated carbon from your filter. The carbon will bind to any remaining medication, making it ineffective as treatment.
If you have an internal filter, take the filter out and soak it in a bucket of water for at least 24 hours (no more than 48). After that time, rinse it thoroughly with clean water before putting it back into your tank. If you don’t have an internal filter, you can leave it in place and treat your tank again in a few days.
If you have live plants in your aquarium, make sure they are healthy by checking for brown or yellow leaves before treating with medications