Issue 24

Here are some unit test to cover this issue and the implementation of the proposed fix.
The fix make the deletion test fail due to redirection issue after delete.