Added checks for snapshots into cmd_commit. Fixes [b5f7b7a1e8]