Fix handling exceptions for flashmotion