fix bug #1
fix bug #3