Bug fix #502