fixes serious bug