fixes bug in previous commit