Add more validation to billing code; #794