Fix motion logging

Fixes #757, #758 and #759