Added Check for Revision IDs from previous plugin versions and fixed a bug

Check the 3 commits for details.