Bug fixes: #6, #7