solution for bug 307