Fix issue with attachments not registered under certain conditions.
Increase version to 0.5.4.
Merge remote-tracking branch 'origin/devel'