Fixed two more bugs.
Merge branch 'origin/1.0.4b'