1582 bug fixed