Fixed #4, #3, #2.