Tests added
Bug fixed