fixes a bug