fixing potential bug

fixing potential bug