Added new test and fixed existing one