Fixed bug 589