Added cluster master check
Merge pull request #4 from lxe/master

Added cluster master check