Revert "Revert "bug fixed""

This reverts commit 1a987739d293b37540b3b6f32fa904ea4862de02.