Fixed bug #7, #5