fixed a potential bug

(reported by the static analyzer)