fix bug in previous