Fixed Bug #7

Added test