logic Bug Fixing.