Added protection with version detection. Fixed #43