solution for bug 305