Update and fix bug #2