Fixed bug #439,#440