Fixed small bugs with #3 and #8.