If you can pump fluid through the system the master cylinder if fine, and you still have air in the system.
The trick is, tie the leaver back to the bar, and leave the top loose on the reservoir. Leave for 24hrs, release the leaver and you should have a good brake.
This method has never failed for me.
Having the correct leaver helps.