Added checking for last payment