Slightly fix while bugs