Motion detection: minor changes