Bug fix #249