Fixed #744 and #745
Merge pull request #755 from dvvrd/fix744

Fixed #744 and #745