Fixed #1372. Minor fixes.