Fix #1379
Fix #1377
(cherry picked from commit a9e7ba23fb02ed8ee51073167914769c7612cf23)
Merge pull request #76 from sjinks/issue-1379

Fix #1379
Fix #1379
Merge pull request #1381 from sjinks/issue-1379

Fix #1379
Merge pull request #1382 from sjinks/issue-1377

[1.3.0] Fix #1377
Merge pull request #1383 from dreamsxin/view

Fix #1379