Check waiting status when updating module status

Now when looking for the module to update its status, it is looked for
by name and waiting status to solve the issue with the duplicates.

Closes #15
Merge pull request #17 from varomorf/issue15

Check waiting status when updating module status