updated fix based on jamuhl's comment.