Add tests & fix bug with convert