Added first test. Fixed one bug with stop.