fixed bug #115-118