Fix a small bug with creating of ReturnSpec object
Fix unit test