Theres one error in the last case others work fine. Debugging will be appreciated.