Dosing C02 always helps but it's more likely that your java fern isn't getting enough nutrients from the substrate. If you're using regular gravel then try adding root tabs under them. Or you could replace the substrate with a planted substrate containing beneficial nutrients.