Fixed bug 1049.