Fixed to not spin loop endlessly