solved bug in previous commit