fix silly mistake. TODO: needs tests