Added a test to show where the bug is.
Critical bug fix for pre and post conditions.