Added the required changes to handle modal re-initialization.
Merge pull request #64 from Jedwondle/master

Added the required changes to handle modal re-initialization.