fix contract counting; display payments on contract page