refixed bug correctly