Tweaks on motion_detection